package com.zengqingfa.juc.n3;

import lombok.extern.slf4j.Slf4j;

/**
 * @author zengqingfa
 * @className TestCreateThread2
 * @description
 * @create 2021/6/5 20:45
 */
@Slf4j(topic = "c.TestCreateThread2")
public class TestCreateThread2 {

    public static void main(String[] args) {
        Runnable runnable1 = new Runnable() {
            @Override
            public void run() {
                log.debug("runing...1");
            }
        };
        Runnable runnable2 = () -> {
            log.debug("runing...2");
        };
        Thread t1 = new Thread(runnable1, "t1");
        Thread t2 = new Thread(runnable2, "t2");
        t1.start();
        t2.start();
    }
}